//
//  BSFriendTrendViewController.m
//  BaiSi
//
//  Created by Sycamore on 16/4/27.
//  Copyright © 2016年 Sycamore. All rights reserved.
//

#import "BSFriendTrendViewController.h"
#import "BSLoginViewController.h"
#import "BSRecommendViewController.h"

@interface BSFriendTrendViewController ()

@end

@implementation BSFriendTrendViewController
- (IBAction)login {
    //xib创建的控制器，init时内部会调用initWithNibName方法
    BSLoginViewController *login = [[BSLoginViewController alloc]init];
    
    [self presentViewController:login animated:YES completion:nil];
}

- (void)viewDidLoad {
    [super viewDidLoad];
    self.navigationItem.title = @"我的关注";
    
    
    //自定义的button作为barbuttonItem,点击很大的范围都可以响应，可以用个view把button包起来，就能解决这个问题了

    self.navigationItem.leftBarButtonItem = [UIBarButtonItem itemWithImage:[UIImage imageNamed:@"friendsRecommentIcon"] highlightedImage:[UIImage imageNamed:@"friendsRecommentIcon-click"] target:self action:@selector(addFriends)];
}


- (void)addFriends
{
    BSRecommendViewController *recommend = [[BSRecommendViewController alloc]init];
    [self.navigationController pushViewController:recommend animated:YES];
}
@end
